package Classwork;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        Scanner buf=new Scanner(System.in);
        System.out.print("请输入一个整数：");
        int n=buf.nextInt();
        for (int i=1;i<=n;i++){
            for (int a=1;a<=n-i;a++){
                System.out.print(" ");
            }
            for (int b=0;b<2*i-1;b++){
                System.out.print("*");
            }
            System.out.println();
        }
        for (int i=n-1;i>0;i--){
            for (int a=1;a<=n-i;a++){
                System.out.print(" ");
            }for (int b=1;b<=2*i-1;b++){
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
